home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look,alt.toolkits.xview,comp.windows.news,alt.sys.sun,alt.toolkits.intrinsics,comp.answers,alt.answers,news.answers
- Path: bloom-beacon.mit.edu!hookup!news.moneng.mei.com!howland.reston.ans.net!cs.utexas.edu!utnut!utzoo!sq!lee
- From: lee@sq.sq.com (Liam Quin)
- Subject: OPEN LOOK GUI FAQ 03/04: the XView Toolkit
- Message-ID: <liamfaq-ol3-23@sq.com>
- Followup-To: poster
- Summary: FAQ for the freely available XView X Windows toolkit
- Supersedes: <liamfaq-ol1-23@sq.com>
- Reply-To: lee@sq.com (Liam R. E. Quin)
- Organization: SoftQuad Inc., Toronto, Canada
- References: <liamfaq-ol1-24@sq.com> <liamfaq-ol2-23@sq.com>
- Date: Thu, 24 Mar 94 23:06:15 GMT
- Approved: news-answers-request@MIT.EDU
- Expires: 24 Apr 1994 02:49:16 GMT
- Lines: 128
- Xref: bloom-beacon.mit.edu comp.windows.open-look:4195 alt.toolkits.xview:1500 comp.windows.news:663 alt.sys.sun:1731 comp.answers:4322 alt.answers:2210 news.answers:16815
-
- Archive-name: open-look/03-xview
-
-
- This is a new FAQ.
-
- Contributions will be welcomed; mail them to lee@sq.com (Liam Quin),
- preferably including "XView FAQ" in the Subject line.
-
- [1] Sources Of Information
- [2] how do I set the font of individual Scrolling List items?
- [3] how do I keep an XView pop-up window displayed after a button is pressed?
- [4] how do I make an XView button look pressed?
- [5] OpenWindows 3 imake doesn't work properly
- [6] The pop-up menu in my canvas has funny colours
- [7] The second ttysw in my program doesn't work
- [8] How do arrange to have a (Cancel) button to stop a calacuation?
- [9] How do I put panel items on a canvas?
-
-
- [1] Sources Of Information:
- netnews newsgroups:
- alt.toolkits.xview - best for specific XView questions
- comp.windows.open-look
- comp.windows.x - highest volume
- Watch for Frequently Asked Questions lists (such as this) in these
- groups. The article you are reading is part of the alt.toolkits.xview
- and comp.windows.open-look FAQ.
-
- Books:
- See the comp.windows.open-look FAQ, which lists several books on X
- and XView. The O'Reiily books in particular are recommended.
-
- Source: code:
- the FTP site export.lcs.mit.edu, in directory /contrib, has the
- full XView source (the latest release is 3.2), together with lots
- of X programs. Programs whose name ends in "tool" or starts with
- "xv" are often based on XView.
-
- [2] how do I set the font of individual Scrolling List items?
- PANEL_LIST_FONT takes an int row_number and an Xv_opaque font_handle.
- PANEL_LIST_FONTS take a NULL terminated list of Xv_opaque font_handles.
- There is no easy way to make an entire list fixed width font.
- You have to make sure that you always specify PANEL_LIST_FONT when you
- insert a new row into that list, or write a convenience function
- insert_row(list, row, string) that hides the nasty bits.
- The most efficient way to do this involves creating an Xv_attr array
- to do lots of insertions at once, complete with PANEL_LIST_FONTs.
-
- [3] how do I keep an XView pop-up window displayed after a button is pressed?
- In the button callback, do
- xv_set(button, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
- This will keep the window visible.
- You might also need to investigate the MENU_NOTIFY_STATUS attribute.
-
- [4] how do I make an XView button look pressed?
- call panel_begin_preview() and panel_cancel_preview(); these are
- documented in -- er -- the XView 3 source...
-
- [5] OpenWindows 3 imake doesn't work properly
- Here is Greg Earle's patch, to be applied in $OPENWINHOME; note that you
- should edit lib/config/sun.cf afterwards to get OSName and
- OSMinorVersion right (MinorVersion is 1 in SunOS 4.1.2, for example).
- I have edited the patch a little, so any bugs are mine [lee@sq.com] :-)
-
- *** bin/xmkmf.orig Wed Sep 18 07:02:02 1991
- --- bin/xmkmf Tue Aug 6 00:39:20 1991
- ***************
- *** 30,34 ****
-
- elif [ -n "$OPENWINHOME" ]; then
- ! args="-DUseInstalled $OPENWINHOME/lib/config"
-
- else
- --- 30,34 ----
-
- elif [ -n "$OPENWINHOME" ]; then
- ! args="-I$OPENWINHOME/lib/config -DUseInstalled -DXCOMM='/**/#'"
-
- else
- *** lib/config/site.def.orig Wed Sep 18 01:26:19 1991
- --- lib/config/site.def Tue Aug 6 00:44:37 1991
- ***************
- *** 0 ****
- --- 1,7 ----
- + #define BinDir $(OPENWINHOME)/bin
- + #define LibDir $(OPENWINHOME)/lib
- + #define IncRoot $(OPENWINHOME)/share/include
- + #define InstallNonExecFile(file,dest) @@\
- + install:: file @@\
- + $(INSTALL) -c $(INSTDATFLAGS) file dest
- + #define NullParameter
-
-
- [6] The pop-up menu in my canvas has funny colours
- You need to use CMS_CONTROL_CMS when you create the CMS for your canvas.
- This allocates the OPEN LOOK UI 3D colors at the start of the colormap.
- The foreground color lives right at the end.
-
- [7] The second ttysw in my program doesn't work
- XView only supports one ttysw per program!
-
- [8] How do arrange to have a (Cancel) button to stop a calacuation?
- When you are doing cpu-intensive calculations, your program probably
- isn't calling the XView notifier, so that button presses aren't noticed
- until the computation is over.
- There are several possible solutions:
- * use the implicit or explicit notify displatch mechanism, described
- in the Notifier chapter of the XView Programming Manual (O'Reilly);
- * use multiple processes, and send signals;
- * split up the work into small chunks and use notify_stop to return to
- the main loop for each chunk.
-
- [9] How do I put panel items on a canvas?
- You don't.
- You can, however, draw on a panel, as if it was a canvas.
- Another alternative is to use olgx to render the controls, but this is
- a little tricky.
-
-
- END of XView FAQ
-
- # $Id$
-
- --
- Liam Quin, Manager of Contracting, SoftQuad Inc +1 416 239 4801 lee@sq.com
- HexSweeper NeWS game;OPEN LOOK/XView/mf-fonts FAQs;lq-text unix text retrieval
-
- who is my neighbour?
-